package com.xtianzhuang.www.service;

import java.util.List;

import com.alibaba.fastjson.JSONArray;
import com.xtianzhuang.www.entity.TdPProject;
import com.xtianzhuang.www.entity.TdPProjectExample;
import com.xtianzhuang.www.entity.TdPProjectParam;
import com.xtianzhuang.www.entity.TdPProjectParamExample;
import com.xtianzhuang.www.entity.VInterfaceParam;
import com.xtianzhuang.www.entity.VInterfaceParamExample;
import com.xtianzhuang.www.entity.VProjectIntf;
import com.xtianzhuang.www.entity.VProjectIntfExample;
import com.xtianzhuang.www.entity.VProjectTask;
import com.xtianzhuang.www.entity.VProjectTaskExample;
import com.xtianzhuang.www.entity.request.AddTaskRequest;
import com.xtianzhuang.www.entity.request.DeleteInterfaceParamsRequest;
import com.xtianzhuang.www.entity.request.DeleteProjectInterfaceRequest;
import com.xtianzhuang.www.entity.request.DeleteProjectParamRequest;
import com.xtianzhuang.www.entity.request.DeleteTaskRequest;
import com.xtianzhuang.www.entity.request.SaveInterfaceParamRequest;
import com.xtianzhuang.www.entity.request.SaveProjectInterfaceRequest;
import com.xtianzhuang.www.entity.request.SaveProjectParamRequest;
import com.xtianzhuang.www.entity.request.UpdateTaskRequest;
import com.xtianzhuang.www.entity.response.AddTaskResponse;
import com.xtianzhuang.www.entity.response.UpdateTaskResponse;
import com.xtianzhuang.www.utils.PageData;

public interface ProjectService {
	List<TdPProject> projetListQuery(TdPProjectExample example);

	List<TdPProject> getProjectList();

	TdPProject selectTdPProjectByProjectId(Integer projectId);

	long projetListCountQuery(TdPProjectExample example);

	long projetParamListCountQuery(TdPProjectParamExample example);

	List<TdPProjectParam> projetParamListQuery(TdPProjectParamExample example);

	List<VProjectIntf> projetDetailQuery(VProjectIntfExample example);

	long projetTaskCountQuery(VProjectTaskExample example);

	List<VProjectTask> projetTaskQuery(VProjectTaskExample example);

	long interfaceParamsCountQuery(VInterfaceParamExample example);

	List<VInterfaceParam> interfaceParamsQuery(VInterfaceParamExample example);

	long projetDetailCountQuery(VProjectIntfExample example);
	
	AddTaskResponse addTask(AddTaskRequest request);

	UpdateTaskResponse updateTask(UpdateTaskRequest request);

	List<TdPProject> selectProjectInUse();
	
	void deleteProjectTask(DeleteTaskRequest request);

	void addProjectInterface(SaveProjectInterfaceRequest request) throws Exception;

	void updateProjectInterface(SaveProjectInterfaceRequest request) throws Exception;

	void addInterfaceParam(SaveInterfaceParamRequest request) throws Exception;

	void updateInterfaceParam(SaveInterfaceParamRequest request) throws Exception;

	void addProjectParam(SaveProjectParamRequest request) throws Exception;

	void updateProjectParam(SaveProjectParamRequest request) throws Exception;

	void deleteProjectParam(DeleteProjectParamRequest request) throws Exception;

	void deleteInterfaceParams(DeleteInterfaceParamsRequest request);

	void deleteProjectInterface(DeleteProjectInterfaceRequest request);

	String getInput(Integer interfaceId);

	JSONArray getParamTree(Integer interfaceId);

	void checkDir(String parentDir) throws Exception;

	void getProjectInterfaceDocument(String projectDir, TdPProject tdPProject, PageData<VProjectIntf> data)
			throws Exception;

	void getInterfaceParamsDocument(String projectDir, TdPProject tdPProject, PageData<VProjectIntf> data,String type)
			throws Exception;
}
